import { getDicType } from "@/api/config";

export default async function useDictionary(type) {
  let res = await getDicType(type);
  let data =
    res?.items?.map((item) => {
      return {
        label: item.dictLabel,
        value: item.dictLabel,
      };
    }) ?? [];
  return data;
}
